<? 
error_reporting(0);
session_start();

$host = "localhost";
$port = "5432";
$user = "root";
$pass = "root";
$dbname = "base";

$db = pg_connect("host=$host port=$port user=$user password=$pass dbname=$dbname");
if( !$db )
{
echo "No pudo realizar la conexión!";
exit;
}
#pg_close($db);
?>
